package com.zlzxm.shoesmarket.net.repository;

import com.zlzxm.shoesmarket.net.RetrofitClient;
import com.zlzxm.shoesmarket.net.api.WareApi;
import com.zlzxm.shoesmarket.net.request.RqWareUpdate;
import com.zlzxm.shoesmarket.net.respone.BaseResponse;
import com.zlzxm.shoesmarket.net.request.RqWareAdd;
import com.zlzxm.shoesmarket.net.respone.RpRepository;

import java.util.List;

import io.reactivex.rxjava3.core.Observable;

/**
 * CREATE BY zlzxm ON 2021/5/14
 */
public class WareRepository {

    WareApi wareApi = RetrofitClient.create(WareApi.class);

    public Observable<BaseResponse<List<RpRepository>>> ware(String userId){

        return wareApi.ware(userId);
    }


    public Observable<BaseResponse<String>> add( RqWareAdd rqWareAdd){

        return wareApi.add(rqWareAdd);
    }

    public Observable<BaseResponse<String>> update( RqWareUpdate rqWareUpdate){

        return wareApi.update(rqWareUpdate);
    }


    public Observable<BaseResponse<String>> update1( RqWareUpdate rqWareUpdate){

        return wareApi.update(rqWareUpdate);
    }
}
